package com.sxt.a_direct;

import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: 雷哥
 * @Date: 2020/10/07/1:02
 * @Description:
 */
@Component
public class HelloConsumer {

  @RabbitListener(queuesToDeclare = {@Queue("hello")})
  public  void receive1(String message){
    System.out.println("接收到消息:"+message);
  }

}
